import request from './request.js'

export function getBanners() {
	return request.get('/banner?type=2')
}

// 获取热门歌曲
export function getSongs(idx=1) {
	return request.get('/top/list', {
		idx
	})
}

// 获取歌单
export function getMenu(limit=6) {
	return request.get('/top/playlist', {
		limit
	})
}

// 获取歌单详情
export function getMenuDetail(id){
	return request.get('/playlist/detail/dynamic', {
		id
	})
}

// 更多歌单
export function getMoreMenu(limit) {
	return request.get('/top/playlist', {
		limit
	})
}

// 获取热门搜索
export function getHotSuggest() {
	return request.get('/search/hot')
}

// 搜索建议
export function getSearchSuggest(keywords, type="mobile") {
	return request.get('/search/suggest', {
		keywords,
		type
	})
}

// 搜索
export function getSearchResult(keywords) {
	return request.get('/search', {
		keywords
	})
}

// 获取音乐资源
export function getMusic(ids) {
	return request.get('/song/detail', {
		ids
	})
}

// 获取歌词
export function getLyric(id) {
	return request.get('/lyric', {
		id
	})
}